#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int M, N, i, a, t = 0, sum=0, num=0;
	scanf("%d %d", &M, &N);
	for (i = M; i <= N;i++)
	{
		for (a = 2; a < i; a++)
		{
			if (i % a != 0)
				t++;
		}
		if (t == i - 2)
		{
			sum += i;
			num++;
		}
			t = 0;
	}
	printf("%d %d", num, sum);

	return 0;
}
 
 
 
 
#include <stdio.h>
int main()
{
	int  i,sum=0,b=0,n=1;
	scanf("%d",&b);
	for (i = 1; i <=b; i++)
	{
		n *= i;
		sum += n;

	}
	printf("%d", sum);
	return 0;
}
 
 
 
 
#include <stdio.h>
int main()
{
	int a=1, b=0, N, i;
	scanf("%d",&N);
	for (i = 1; i <= N-1; i++)
	{
		a= (a+1)*2;
	}
	printf("%d",a);
	return 0;
}
 
 
 
 
#include <stdio.h>
int main()
{
	int a;
	double b=1, c = 3.0;
	for (a = 1; a <= 10000; a++)
	{
		b =b-(1.0 / c);
		c=c+2;
		b = b + (1.0 / c);
		c = c + 2;
		if (b< 0.000001)
			break;
	}
	printf("pi=%10.4lf", 4*b);
		return 0;
}
 
 
 
#include <stdio.h>
int main()
{
	int i,a,b,c;
	scanf("%d", &a);
	for (i = 1; i <= 100; i++)
	{
		scanf("%d", &b);
		if (a < b)
			a = b;
		if (b < 0)
			break;
	}
	printf("%d", a);
	return 0;
}
 
 
 
#include <stdio.h>
int main()
{
	int a,sum=0,b=0,c;
	for (a = 1; a <= 300; a++)
	{
		if ((a % 7 == 0 || a % 17 == 0)&&a%2==0)
		{
			printf("%6d", a);
			sum += a;
			b++;
		}
		if (b >= 5)
		{
			printf("\n");
			b = 0;
		}
	}
	printf("\n");
	printf("sum=%d",sum);
	return 0;
}
 
 
 
#include <stdio.h>
int main()
{
	int i, a,b;
	scanf("%d",&i);
	for (b = 1; b <= i; b++)
	{
		for (a = 1; a <= i; a++)
		{
			if(b>=a)
			printf("%d*%d=%-4d",a,b,b*a);
		}
		printf("\n");
	}
	return 0;
}
 
 
 
#include <stdio.h>
int main()
{
	int i, a, b,c,d=0;
	scanf("%d",&a);
	for (i =a/5;i>0; i--)
	{
		for (b = (a - (5 * i))/2; b > 0; b--)
		{
			for (c = a - (5 * i + 2 * b); c > 0;c-- )
			{
				if (i * 5 + b * 2 + c == a)
				{
					printf("fen5:%d, fen2:%d, fen1:%d, total:%d\n", i, b, c, i + b + c);
					d++;
				}
			}
		}
	}
	printf("count = %d",d);
	return 0;
}
 
 
 
 
#include <stdio.h>
int main()
{
	int a, b, i, c, d = 0, e = 0;
	scanf("%d",&a);
	for (i = 0; i <= a / 5; i++)
	{
		for (b = 0; b <= a / 3; b++)
		{
			for (c = 0; c <= 3 *a; c++)
			{
				if ((i * 5 + b * 3 + c / 3 == a) && (i + b + c == a) && (c % 3 == 0))
				{
					d++;
					e = e + i;

				}
			}
		}
	}
	if (d == 0)
		e = -1;
	printf("%d %d",d,e);
	return 0;
}
 
 
 
 
#include <stdio.h>
int main()
{
	int a, i, sum, c = 1, d = 1;
	scanf("%d",&a);
	if (a == 1)
		printf("1");
	else
		for (i = 1; i <= 10000; i++)
	{
		sum = c + d;
		d = c;
		c = sum;
		if (c >= a)
		{
			printf("%d", i + 2);
			break;
		}
	}
	return 0;
}
 
 
 
 
 
#include <stdio.h>
#include <math.h>
int main()
{
	int a,sum=0,i,v,x,z;
	scanf("%d",&a);
	int max = pow(10, a) - 1;
	int min = pow(10, a - 1);
	for (i = min; i <= max; i++)
	{
		x=i;
		for (v = 1;; v++) 
		{
			z = x % 10;
			sum = sum + pow(z, a);
			x = x / 10;
			if (x == 0)
				break;
		}
		if (sum == i)
			printf("%d\n", i);
	}
	return 0;
}
 
 
 
 
 
#include <stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	int arr[n];
	int i;
	for (i = 0; i < n; i++)
	{
		scanf("%d",&a[n]);
	}

	return 0;
}
 
 
 
 
 
#include <stdio.h>
#define ADD(x,y) x+y
int main()
{
	printf("%d",ADD(3,4));
	return 0;
}
#include <stdio.h>
int main()
{
	int l,wide, high;
	scanf("%d %d %d",&l,&wide,&high);
	printf("%d",l*wide*high);
	return 0;
}
 
 
 
 
 
#include <stdio.h>
int main()
{
	int year,hour;
	double salary = 0;
	scanf("%d %d",&year,&hour);
	if (year >= 5)
	{
		if (hour > 40)
		{
			salary = 50 * (40 + (hour - 40) * 1.5);
		}
		else
			salary = 50 *hour;
	}
	else
	{
		if (hour > 40)
		{
			salary =30 * (40 + (hour - 40) * 1.5);
		}
		else
			salary = 30 * hour;
	}
	printf("%.2lf",salary);
	return 0;
}
 
 
 
 
 
#include <stdio.h>
int main()
{
	int m,sign=0,n=0;
	scanf("%d",&m);
	for (int i = m-1; ; i--)
	{
		for (int b = 2; b <i; b++)
		{
			if (i % b == 0)
				break;
			if (b >= i - 1)
			{
				printf("%6d", i);
				sign++;
				break;
			}
		}
		if (sign>= 10)
			break;
	}
	return 0;
}
 
 
 
 
 
#include <stdio.h>
int main()
{
	int i, a, b, d = 0;
	scanf("%d %d", &a, &b);
	int arr[20];
	for (i = 0; i < a; i++)
	{
		scanf("%d", &arr[i]);
	}
	for (int c = 0; c <= a - 1; c++)
	{
		if (b == arr[c])
		{
			printf("%d", c);
			break;
		}
		else
			d++;
	}
	if (d >= a)
		printf("Not Found");
	return 0;
}
 
 
 
 
#include <stdio.h>
int main()
{
	int a, b, i;
	scanf("%d",&a);
	int arr[a];
	for (b = 0; b < a; b++)
	{
		scanf("%d",&arr[b]);
	}
		for (int b = 0; b < a*a; b++)
		{
			arr[b] = arr[b] > arr[b + 1] ? arr[b] : arr[b+1];
		}
	for (int t = 0; t < a; t++)
	{
		printf("%d ",arr[t]);
	}
	return 0;
}
 
 
 
 
#include <stdio.h>
int test(int a)
{
	int n = 0;
	for (int i = 2; i <= a-1; i++)
	{
		if (a % i != 0)
			n++;
		if (n == a - 2)
		{
			printf("Yes");
		}
		else
		{
			printf("No");
		}
	}
	return 0;
}
int main()
{
	printf("test(3)");
	return 0;
}
 
 
 
#include <stdio.h>
int f(int a)
{
	if (a >= 97 && a <= 122)
	{
		a -= 32;
	}
	else if (a >= 65 && a <= 90)
	{
		a += 32;
	}
	else
		;
	return a;
}
int main()
{
	int ch;
	while ((ch = getchar()) != '#')
	{
		ch = f(ch);
		putchar(ch);
	}
	return 0;
}

